<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
    <style>
        [v-cloak]{
            display:none
        }
    </style>
</head>
<body>

<button class="layui-btn layui-btn-sm" id="add">
    <i class="layui-icon">&#xe654;</i>
</button>
<table class="layui-table" lay-filter="demo" id="user-list">
    <thead>
    <tr>
        <th >序号</th>
        <th>用户名</th>
        <th>公司名</th>
        <th>角色</th>
        <th>状态</th>
        <th style="text-align: center">操作</th>
    </tr>
    <tr v-for="(user,index) in list " v-cloak>
        <td>{{index+1}}</td>
        <td>{{user.username}}</td>
        <td>{{user.companyName}}</td>
        <td>{{user.userRole|roleText}}</td>
        <td>{{user.userStatus |statusText}}</td>
        <td style="text-align: center">
            <a v-if="user.userRole<2" @click="resetPassword(user)" class="layui-btn layui-btn-xs" lay-event="edit">重置密码</a>
            <a v-if="user.userStatus==0 && user.userRole!= 2" @click="frozenUser(user.id)" class="layui-btn layui-btn-danger layui-btn-xs">冻结账号</a>
            <a v-if="user.userStatus==1" @click="cancelFrozenUser(user.id)" class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">恢复登录</a>
        </td>
    </tr>
    </thead>
</table>
<div id="page" style="float: right;"></div>



<script src="../../static/layui/layui.js" charset="utf-8"></script>
<script src="../../static/js/vue.min.js"></script>
<script src="../../static/js/user.js"></script>
<script>

</script>

</body>
</html>
